package com.qingxin.park.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.hibernate.annotations.GenericGenerator;

/**
 * 产品检测报告
 */
@Entity
@Table(name = "batch_products_report")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class BatchProductsReport extends com.qingxin.sys.entity.BaseEntity
		implements java.io.Serializable {
	private static final long serialVersionUID = -8162064099858553199L;
	
	private String id;
	private BatchProducts batchProducts;
	private String reportName;
	private String reportUrl;
	private String createBy;
	private Date createTime;
	private String updateBy;
	private Date updateTime;

	// Constructors

	/** default constructor */
	public BatchProductsReport() {
	}

	/** full constructor */
	public BatchProductsReport(BatchProducts batchProducts, String reportName,
			String reportUrl, String createBy, Date createTime,
			String updateBy, Date updateTime) {
		this.batchProducts = batchProducts;
		this.reportName = reportName;
		this.reportUrl = reportUrl;
		this.createBy = createBy;
		this.createTime = createTime;
		this.updateBy = updateBy;
		this.updateTime = updateTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pdtid")
	public BatchProducts getBatchProducts() {
		return this.batchProducts;
	}

	public void setBatchProducts(BatchProducts batchProducts) {
		this.batchProducts = batchProducts;
	}

	@Column(name = "report_name", length = 200)
	public String getReportName() {
		return reportName;
	}

	public void setReportName(String reportName) {
		this.reportName = reportName;
	}
	
	@Column(name = "report_url", length = 200)
	public String getReportUrl() {
		return this.reportUrl;
	}

	public void setReportUrl(String reportUrl) {
		this.reportUrl = reportUrl;
	}

	@Column(name = "create_by", length = 32)
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_by", length = 32)
	public String getUpdateBy() {
		return this.updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	@Column(name = "update_time", length = 23)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

}